\(\int (e x)^{-1+2 n} (a+b \text {sech}(c+d x^n))^2 \, dx\) [77]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [F]
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 24, antiderivative size = 208 \[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {a^2 (e x)^{2 n}}{2 e n}+\frac {4 a b x^{-n} (e x)^{2 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\cosh \left (c+d x^n\right )\right )}{d^2 e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {b^2 x^{-n} (e x)^{2 n} \tanh \left (c+d x^n\right )}{d e n} \]

[Out]

1/2*a^2*(e*x)^(2*n)/e/n+4*a*b*(e*x)^(2*n)*arctan(exp(c+d*x^n))/d/e/n/(x^n)-b^2*(e*x)^(2*n)*ln(cosh(c+d*x^n))/d
^2/e/n/(x^(2*n))-2*I*a*b*(e*x)^(2*n)*polylog(2,-I*exp(c+d*x^n))/d^2/e/n/(x^(2*n))+2*I*a*b*(e*x)^(2*n)*polylog(
2,I*exp(c+d*x^n))/d^2/e/n/(x^(2*n))+b^2*(e*x)^(2*n)*tanh(c+d*x^n)/d/e/n/(x^n)

Rubi [A] (verified)

Time = 0.16 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5548, 5544, 4275, 4265, 2317, 2438, 4269, 3556} \[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {a^2 (e x)^{2 n}}{2 e n}+\frac {4 a b x^{-n} (e x)^{2 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-i e^{d x^n+c}\right )}{d^2 e n}+\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,i e^{d x^n+c}\right )}{d^2 e n}-\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\cosh \left (c+d x^n\right )\right )}{d^2 e n}+\frac {b^2 x^{-n} (e x)^{2 n} \tanh \left (c+d x^n\right )}{d e n} \]

[In]

Int[(e*x)^(-1 + 2*n)*(a + b*Sech[c + d*x^n])^2,x]

[Out]

(a^2*(e*x)^(2*n))/(2*e*n) + (4*a*b*(e*x)^(2*n)*ArcTan[E^(c + d*x^n)])/(d*e*n*x^n) - (b^2*(e*x)^(2*n)*Log[Cosh[
c + d*x^n]])/(d^2*e*n*x^(2*n)) - ((2*I)*a*b*(e*x)^(2*n)*PolyLog[2, (-I)*E^(c + d*x^n)])/(d^2*e*n*x^(2*n)) + ((
2*I)*a*b*(e*x)^(2*n)*PolyLog[2, I*E^(c + d*x^n)])/(d^2*e*n*x^(2*n)) + (b^2*(e*x)^(2*n)*Tanh[c + d*x^n])/(d*e*n
*x^n)

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4265

Int[csc[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c +
 d*x)^m*(ArcTanh[E^((-I)*e + f*fz*x)/E^(I*k*Pi)]/(f*fz*I)), x] + (-Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*
Log[1 - E^((-I)*e + f*fz*x)/E^(I*k*Pi)], x], x] + Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 + E^((-I)*e
 + f*fz*x)/E^(I*k*Pi)], x], x]) /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 4269

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(c + d*x)^m)*(Cot[e + f*x]/f), x
] + Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4275

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 5544

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rule 5548

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[e^IntPart[m]*((e*
x)^FracPart[m]/x^FracPart[m]), Int[x^m*(a + b*Sech[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\left (x^{-2 n} (e x)^{2 n}\right ) \int x^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx}{e} \\ & = \frac {\left (x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int x (a+b \text {sech}(c+d x))^2 \, dx,x,x^n\right )}{e n} \\ & = \frac {\left (x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \left (a^2 x+2 a b x \text {sech}(c+d x)+b^2 x \text {sech}^2(c+d x)\right ) \, dx,x,x^n\right )}{e n} \\ & = \frac {a^2 (e x)^{2 n}}{2 e n}+\frac {\left (2 a b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int x \text {sech}(c+d x) \, dx,x,x^n\right )}{e n}+\frac {\left (b^2 x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int x \text {sech}^2(c+d x) \, dx,x,x^n\right )}{e n} \\ & = \frac {a^2 (e x)^{2 n}}{2 e n}+\frac {4 a b x^{-n} (e x)^{2 n} \arctan \left (e^{c+d x^n}\right )}{d e n}+\frac {b^2 x^{-n} (e x)^{2 n} \tanh \left (c+d x^n\right )}{d e n}-\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \log \left (1-i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}+\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \log \left (1+i e^{c+d x}\right ) \, dx,x,x^n\right )}{d e n}-\frac {\left (b^2 x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \tanh (c+d x) \, dx,x,x^n\right )}{d e n} \\ & = \frac {a^2 (e x)^{2 n}}{2 e n}+\frac {4 a b x^{-n} (e x)^{2 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\cosh \left (c+d x^n\right )\right )}{d^2 e n}+\frac {b^2 x^{-n} (e x)^{2 n} \tanh \left (c+d x^n\right )}{d e n}-\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^2 e n}+\frac {\left (2 i a b x^{-2 n} (e x)^{2 n}\right ) \text {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{c+d x^n}\right )}{d^2 e n} \\ & = \frac {a^2 (e x)^{2 n}}{2 e n}+\frac {4 a b x^{-n} (e x)^{2 n} \arctan \left (e^{c+d x^n}\right )}{d e n}-\frac {b^2 x^{-2 n} (e x)^{2 n} \log \left (\cosh \left (c+d x^n\right )\right )}{d^2 e n}-\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,-i e^{c+d x^n}\right )}{d^2 e n}+\frac {2 i a b x^{-2 n} (e x)^{2 n} \operatorname {PolyLog}\left (2,i e^{c+d x^n}\right )}{d^2 e n}+\frac {b^2 x^{-n} (e x)^{2 n} \tanh \left (c+d x^n\right )}{d e n} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(501\) vs. \(2(208)=416\).

Time = 5.47 (sec) , antiderivative size = 501, normalized size of antiderivative = 2.41 \[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\frac {x^{-2 n} (e x)^{2 n} \text {csch}^5(c) \text {sech}\left (c+d x^n\right ) \left (-2 b^2 d x^n \cosh \left (d x^n\right ) \sqrt {-\text {csch}^2(c)}+2 b^2 d x^n \cosh \left (2 c+d x^n\right ) \sqrt {-\text {csch}^2(c)}+8 a b d x^n \cosh \left (c+d x^n\right ) \log \left (1-e^{-d x^n-\text {arctanh}(\coth (c))}\right )+8 a b \text {arctanh}(\coth (c)) \cosh \left (c+d x^n\right ) \log \left (1-e^{-d x^n-\text {arctanh}(\coth (c))}\right )-8 a b d x^n \cosh \left (c+d x^n\right ) \log \left (1+e^{-d x^n-\text {arctanh}(\coth (c))}\right )-8 a b \text {arctanh}(\coth (c)) \cosh \left (c+d x^n\right ) \log \left (1+e^{-d x^n-\text {arctanh}(\coth (c))}\right )+8 a b \cosh \left (c+d x^n\right ) \operatorname {PolyLog}\left (2,-e^{-d x^n-\text {arctanh}(\coth (c))}\right )-8 a b \cosh \left (c+d x^n\right ) \operatorname {PolyLog}\left (2,e^{-d x^n-\text {arctanh}(\coth (c))}\right )-a^2 d^2 x^{2 n} \sqrt {-\text {csch}^2(c)} \sinh \left (d x^n\right )+8 a b \arctan \left (\sinh (c)+\cosh (c) \tanh \left (\frac {d x^n}{2}\right )\right ) \text {arctanh}(\coth (c)) \sqrt {-\text {csch}^2(c)} \sinh \left (d x^n\right )+2 b^2 \sqrt {-\text {csch}^2(c)} \log \left (\cosh \left (c+d x^n\right )\right ) \sinh \left (d x^n\right )+a^2 d^2 x^{2 n} \sqrt {-\text {csch}^2(c)} \sinh \left (2 c+d x^n\right )-8 a b \arctan \left (\sinh (c)+\cosh (c) \tanh \left (\frac {d x^n}{2}\right )\right ) \text {arctanh}(\coth (c)) \sqrt {-\text {csch}^2(c)} \sinh \left (2 c+d x^n\right )-2 b^2 \sqrt {-\text {csch}^2(c)} \log \left (\cosh \left (c+d x^n\right )\right ) \sinh \left (2 c+d x^n\right )\right )}{4 d^2 e n \left (-\text {csch}^2(c)\right )^{5/2}} \]

[In]

Integrate[(e*x)^(-1 + 2*n)*(a + b*Sech[c + d*x^n])^2,x]

[Out]

((e*x)^(2*n)*Csch[c]^5*Sech[c + d*x^n]*(-2*b^2*d*x^n*Cosh[d*x^n]*Sqrt[-Csch[c]^2] + 2*b^2*d*x^n*Cosh[2*c + d*x
^n]*Sqrt[-Csch[c]^2] + 8*a*b*d*x^n*Cosh[c + d*x^n]*Log[1 - E^(-(d*x^n) - ArcTanh[Coth[c]])] + 8*a*b*ArcTanh[Co
th[c]]*Cosh[c + d*x^n]*Log[1 - E^(-(d*x^n) - ArcTanh[Coth[c]])] - 8*a*b*d*x^n*Cosh[c + d*x^n]*Log[1 + E^(-(d*x
^n) - ArcTanh[Coth[c]])] - 8*a*b*ArcTanh[Coth[c]]*Cosh[c + d*x^n]*Log[1 + E^(-(d*x^n) - ArcTanh[Coth[c]])] + 8
*a*b*Cosh[c + d*x^n]*PolyLog[2, -E^(-(d*x^n) - ArcTanh[Coth[c]])] - 8*a*b*Cosh[c + d*x^n]*PolyLog[2, E^(-(d*x^
n) - ArcTanh[Coth[c]])] - a^2*d^2*x^(2*n)*Sqrt[-Csch[c]^2]*Sinh[d*x^n] + 8*a*b*ArcTan[Sinh[c] + Cosh[c]*Tanh[(
d*x^n)/2]]*ArcTanh[Coth[c]]*Sqrt[-Csch[c]^2]*Sinh[d*x^n] + 2*b^2*Sqrt[-Csch[c]^2]*Log[Cosh[c + d*x^n]]*Sinh[d*
x^n] + a^2*d^2*x^(2*n)*Sqrt[-Csch[c]^2]*Sinh[2*c + d*x^n] - 8*a*b*ArcTan[Sinh[c] + Cosh[c]*Tanh[(d*x^n)/2]]*Ar
cTanh[Coth[c]]*Sqrt[-Csch[c]^2]*Sinh[2*c + d*x^n] - 2*b^2*Sqrt[-Csch[c]^2]*Log[Cosh[c + d*x^n]]*Sinh[2*c + d*x
^n]))/(4*d^2*e*n*x^(2*n)*(-Csch[c]^2)^(5/2))

Maple [F]

\[\int \left (e x \right )^{2 n -1} {\left (a +b \,\operatorname {sech}\left (c +d \,x^{n}\right )\right )}^{2}d x\]

[In]

int((e*x)^(2*n-1)*(a+b*sech(c+d*x^n))^2,x)

[Out]

int((e*x)^(2*n-1)*(a+b*sech(c+d*x^n))^2,x)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2972 vs. \(2 (199) = 398\).

Time = 0.32 (sec) , antiderivative size = 2972, normalized size of antiderivative = 14.29 \[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\text {Too large to display} \]

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n))^2,x, algorithm="fricas")

[Out]

1/2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 + 4*b^2*c*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh((2*n - 1
)*log(e))*cosh(n*log(x))^2 + 4*b^2*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 4*b^2*c*cosh((2*n - 1)*log(e)) +
(a^2*d^2*cosh((2*n - 1)*log(e)) + a^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 + (a^2*d^2*cosh(n*log(x))^2
 + 4*b^2*d*cosh(n*log(x)) + 4*b^2*c)*sinh((2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))
 + 2*b^2*d*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh(n*log(x)) + 2*b^2*d)*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))
*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 + 4*b^2*
d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 4*b^2*c*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh((2*n - 1)*log(e)) + a
^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 + (a^2*d^2*cosh(n*log(x))^2 + 4*b^2*d*cosh(n*log(x)) + 4*b^2*c
)*sinh((2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 2*b^2*d*cosh((2*n - 1)*log(e)) +
 (a^2*d^2*cosh(n*log(x)) + 2*b^2*d)*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*l
og(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x))^2 +
 4*b^2*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 4*b^2*c*cosh((2*n - 1)*log(e)) + (a^2*d^2*cosh((2*n - 1)*log(
e)) + a^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 + (a^2*d^2*cosh(n*log(x))^2 + 4*b^2*d*cosh(n*log(x)) +
4*b^2*c)*sinh((2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + 2*b^2*d*cosh((2*n - 1)*lo
g(e)) + (a^2*d^2*cosh(n*log(x)) + 2*b^2*d)*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*sinh(d*cosh(n*log(x)) + d*s
inh(n*log(x)) + c)^2 + (a^2*d^2*cosh((2*n - 1)*log(e)) + a^2*d^2*sinh((2*n - 1)*log(e)))*sinh(n*log(x))^2 - 4*
((-I*a*b*cosh((2*n - 1)*log(e)) - I*a*b*sinh((2*n - 1)*log(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^
2 - I*a*b*cosh((2*n - 1)*log(e)) + 2*(-I*a*b*cosh((2*n - 1)*log(e)) - I*a*b*sinh((2*n - 1)*log(e)))*cosh(d*cos
h(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (-I*a*b*cosh((2*n - 1)*log
(e)) - I*a*b*sinh((2*n - 1)*log(e)))*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 - I*a*b*sinh((2*n - 1)*lo
g(e)))*dilog(I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)
) - 4*((I*a*b*cosh((2*n - 1)*log(e)) + I*a*b*sinh((2*n - 1)*log(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x))
+ c)^2 + I*a*b*cosh((2*n - 1)*log(e)) + 2*(I*a*b*cosh((2*n - 1)*log(e)) + I*a*b*sinh((2*n - 1)*log(e)))*cosh(d
*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (I*a*b*cosh((2*n - 1)*
log(e)) + I*a*b*sinh((2*n - 1)*log(e)))*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + I*a*b*sinh((2*n - 1)
*log(e)))*dilog(-I*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x))
+ c)) - 2*(((2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*cosh(d*cosh(n
*log(x)) + d*sinh(n*log(x)) + c)^2 + 2*((2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (2*I*a*b*c + b^2)*sinh((2*n
 - 1)*log(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + (
(2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*sinh(d*cosh(n*log(x)) + d
*sinh(n*log(x)) + c)^2 + (2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*
log(cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + I) - 2*(((
-2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (-2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*cosh(d*cosh(n*log(x)) +
d*sinh(n*log(x)) + c)^2 + 2*((-2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (-2*I*a*b*c + b^2)*sinh((2*n - 1)*log
(e)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + ((-2*I*a*b
*c + b^2)*cosh((2*n - 1)*log(e)) + (-2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*sinh(d*cosh(n*log(x)) + d*sinh(n
*log(x)) + c)^2 + (-2*I*a*b*c + b^2)*cosh((2*n - 1)*log(e)) + (-2*I*a*b*c + b^2)*sinh((2*n - 1)*log(e)))*log(c
osh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I) - 4*(I*a*b*d
*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + I*a*b*c*cosh((2*n - 1)*log(e)) + (I*a*b*d*cosh((2*n - 1)*log(e))*cosh
(n*log(x)) + I*a*b*c*cosh((2*n - 1)*log(e)) + (I*a*b*d*cosh(n*log(x)) + I*a*b*c)*sinh((2*n - 1)*log(e)) + (I*a
*b*d*cosh((2*n - 1)*log(e)) + I*a*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n
*log(x)) + c)^2 + 2*(I*a*b*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + I*a*b*c*cosh((2*n - 1)*log(e)) + (I*a*b*d
*cosh(n*log(x)) + I*a*b*c)*sinh((2*n - 1)*log(e)) + (I*a*b*d*cosh((2*n - 1)*log(e)) + I*a*b*d*sinh((2*n - 1)*l
og(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x))
 + c) + (I*a*b*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + I*a*b*c*cosh((2*n - 1)*log(e)) + (I*a*b*d*cosh(n*log(
x)) + I*a*b*c)*sinh((2*n - 1)*log(e)) + (I*a*b*d*cosh((2*n - 1)*log(e)) + I*a*b*d*sinh((2*n - 1)*log(e)))*sinh
(n*log(x)))*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + (I*a*b*d*cosh(n*log(x)) + I*a*b*c)*sinh((2*n - 1
)*log(e)) + (I*a*b*d*cosh((2*n - 1)*log(e)) + I*a*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*log(I*cosh(d*cos
h(n*log(x)) + d*sinh(n*log(x)) + c) + I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 1) - 4*(-I*a*b*d*cosh(
(2*n - 1)*log(e))*cosh(n*log(x)) - I*a*b*c*cosh((2*n - 1)*log(e)) + (-I*a*b*d*cosh((2*n - 1)*log(e))*cosh(n*lo
g(x)) - I*a*b*c*cosh((2*n - 1)*log(e)) + (-I*a*b*d*cosh(n*log(x)) - I*a*b*c)*sinh((2*n - 1)*log(e)) + (-I*a*b*
d*cosh((2*n - 1)*log(e)) - I*a*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*lo
g(x)) + c)^2 + 2*(-I*a*b*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) - I*a*b*c*cosh((2*n - 1)*log(e)) + (-I*a*b*d*
cosh(n*log(x)) - I*a*b*c)*sinh((2*n - 1)*log(e)) + (-I*a*b*d*cosh((2*n - 1)*log(e)) - I*a*b*d*sinh((2*n - 1)*l
og(e)))*sinh(n*log(x)))*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x))
 + c) + (-I*a*b*d*cosh((2*n - 1)*log(e))*cosh(n*log(x)) - I*a*b*c*cosh((2*n - 1)*log(e)) + (-I*a*b*d*cosh(n*lo
g(x)) - I*a*b*c)*sinh((2*n - 1)*log(e)) + (-I*a*b*d*cosh((2*n - 1)*log(e)) - I*a*b*d*sinh((2*n - 1)*log(e)))*s
inh(n*log(x)))*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + (-I*a*b*d*cosh(n*log(x)) - I*a*b*c)*sinh((2*n
 - 1)*log(e)) + (-I*a*b*d*cosh((2*n - 1)*log(e)) - I*a*b*d*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))*log(-I*cosh
(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) - I*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + 1) + (a^2*d^2*co
sh(n*log(x))^2 + 4*b^2*c)*sinh((2*n - 1)*log(e)) + 2*(a^2*d^2*cosh((2*n - 1)*log(e))*cosh(n*log(x)) + a^2*d^2*
cosh(n*log(x))*sinh((2*n - 1)*log(e)))*sinh(n*log(x)))/(d^2*n*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2
+ 2*d^2*n*cosh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)*sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c) + d^2*n*
sinh(d*cosh(n*log(x)) + d*sinh(n*log(x)) + c)^2 + d^2*n)

Sympy [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int \left (e x\right )^{2 n - 1} \left (a + b \operatorname {sech}{\left (c + d x^{n} \right )}\right )^{2}\, dx \]

[In]

integrate((e*x)**(-1+2*n)*(a+b*sech(c+d*x**n))**2,x)

[Out]

Integral((e*x)**(2*n - 1)*(a + b*sech(c + d*x**n))**2, x)

Maxima [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{2 \, n - 1} \,d x } \]

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n))^2,x, algorithm="maxima")

[Out]

4*a*b*e^(2*n)*integrate(e^(d*x^n + 2*n*log(x) + c)/(e*x*e^(2*d*x^n + 2*c) + e*x), x) + b^2*(2*e^(2*n)*e^(2*d*x
^n + n*log(x) + 2*c)/(d*e*n*e^(2*d*x^n + 2*c) + d*e*n) - e^(2*n - 1)*log((e^(2*d*x^n + 2*c) + 1)*e^(-2*c))/(d^
2*n)) + 1/2*(e*x)^(2*n)*a^2/(e*n)

Giac [F]

\[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \operatorname {sech}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{2 \, n - 1} \,d x } \]

[In]

integrate((e*x)^(-1+2*n)*(a+b*sech(c+d*x^n))^2,x, algorithm="giac")

[Out]

integrate((b*sech(d*x^n + c) + a)^2*(e*x)^(2*n - 1), x)

Mupad [F(-1)]

Timed out. \[ \int (e x)^{-1+2 n} \left (a+b \text {sech}\left (c+d x^n\right )\right )^2 \, dx=\int {\left (a+\frac {b}{\mathrm {cosh}\left (c+d\,x^n\right )}\right )}^2\,{\left (e\,x\right )}^{2\,n-1} \,d x \]

[In]

int((a + b/cosh(c + d*x^n))^2*(e*x)^(2*n - 1),x)

[Out]

int((a + b/cosh(c + d*x^n))^2*(e*x)^(2*n - 1), x)